/*
 * @Description: 标准饼图数据格式
 * @Autor: HuiSir<273250950@qq.com>
 * @Date: 2020-08-17 11:22:02
 * @LastEditTime: 2020-08-17 15:45:53
 */
const stateRes = { code: 0, msg: 'ok' } //状态码

//普通饼图
export const Pie1 = {
  data: [
    {
      name: '姓名数量',
      'data|6': [
        {
          name: '@cname',
          value: '@integer(100, 1000)'
        }
      ]
    }
  ],
  ...stateRes
}

//嵌套饼图
export const Pie2 = {
  data: [
    {
      name: '访问来源类型',
      data: [
        {
          value: 335,
          name: '直达'
        },
        {
          value: 679,
          name: '营销广告'
        },
        {
          value: 1548,
          name: '搜索引擎'
        }
      ]
    },
    {
      name: '访问来源明细',
      data: [
        {
          value: 335,
          name: '直达'
        },
        {
          value: 310,
          name: '邮件营销'
        },
        {
          value: 234,
          name: '联盟广告'
        },
        {
          value: 135,
          name: '视频广告'
        },
        {
          value: 1048,
          name: '百度'
        },
        {
          value: 251,
          name: '谷歌'
        },
        {
          value: 147,
          name: '必应'
        },
        {
          value: 102,
          name: '其他'
        }
      ]
    }
  ],
  ...stateRes
}
